<?php

Yii::import('application.modules.nutricion.models._base.BaseSubcategoria');

class Subcategoria extends BaseSubcategoria {

    /**
     * @return Subcategoria
     */
    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public static function label($n = 1) {
        return Yii::t('app', 'Subcategoria|Subcategorias', $n);
    }

    public function de_categoria_id($id) {
        $this->getDbCriteria()->mergeWith(
                array(
                    'condition' => 'categoria_id=:categoria_id',
                    'params' => array(
                        ':categoria_id' => $id,
                    )
                )
        );
        return $this;
    }

}
